package com.xuanxing123.service.impl;

import com.xuanxing123.dao.ModuleDao;
import com.xuanxing123.model.Module;
import com.xuanxing123.service.ModuleManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("moduleManager")
public class ModuleManagerImpl extends GenericManagerImpl<Module, Long> implements ModuleManager {
    ModuleDao moduleDao;

    @Autowired
    public ModuleManagerImpl(ModuleDao moduleDao) {
        super(moduleDao);
        this.moduleDao = moduleDao;
    }

    /**
     * {@inheritDoc}
    */
    public List<Module> getModulesByTypeId(Long productTypeId) {
        return moduleDao.getModulesByTypeId(productTypeId);
    }

}